<template>
    <div id="app">
        <router-view v-if="isRouterAlive" />
    </div>
</template>

<script>
// import { getKpi2 } from '@/api/kpi'
// import { mapState, mapMutations } from 'vuex'
export default {
    name: 'App',
    provide() {
        return {
            reload: this.reload
        };
    },
    data() {
        return {
            isRouterAlive: true
        };
    },
    // computed: {
    //   ...mapState({
    //     standardKPI: state => state.standardKPI
    //   })
    // },
    created() {
        // this.getStandardKPI('StandardKPI')
    },
    methods: {
        reload() {
            this.isRouterAlive = false;
            this.$nextTick(function() {
                this.isRouterAlive = true;
            });
        }
        // ...mapMutations([
        //   'setKpi'
        // ]),
        // getStandardKPI(type) {
        //   getKpi2(type).then(res => {
        //       if (res.status == 200) {
        //           if (res.data.code === 200) {
        //               let kpi = res.data.avg_kpi
        //               this.setKpi(kpi)
        //           }
        //       }
        //   })
        // }
    }
};
</script>

<style lang="scss">
.el-table th.gutter {
    display: table-cell !important;
}
div,
span,
a,
i,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: bold;
}
</style>
